from requests import post
import xml.etree.ElementTree as ET
import os

headers = {
'content-type': 'text/xml; charset=utf-8',
}
body = """
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetSilver xmlns="http://silversvc.uc108.net/">
      <userID>111</userID>
    </GetSilver>
  </soap:Body>
</soap:Envelope>""".strip()

result= post('http://silversvc.uc108.org:1505/silverservice.asmx',data=body,headers=headers)
def anlySilversvc(content):
    path = 'temp_soap.xml'
    with open(path,'w') as wf:
        wf.write(content)
    tree = ET.parse(path)
    root = tree.getroot()
    dict_new = {}
    for key, valu in enumerate(root[0][0][0]):
        key = valu.tag.replace('{http://silversvc.uc108.net/}','')
        dict_new[key] = valu.text
    os.remove(path)
    return dict_new

print(anlySilversvc(result.text))